import { commit } from "isomorphic-git";

const locale = {
    settings: {
        splitTimer: {
            name: "Split timers for automatic commit and sync",
            desc: "Enable to use one interval for commit and another for sync.",
        },
        autoCommitInt: {
            name: {
                commit: "Auto commit interval (minutes)",
                "commit-and-sync": "Auto commit-and-sync interval (minutes)",
            },
            desc: {
                commit: "Commit changes every {minutes} minutes. Set to 0 (default) to disable.",
                "commit-and-sync":
                    "Commit and sync changes every {minutes} minutes. Set to 0 (default) to disable. (See below setting for further configuration.)",
            },
        },
        autoCommitAfterStopEdit: {
            name: {
                commit: "Auto commit after stopping file edits",
                "commit-and-sync":
                    "Auto Commit and sync after stopping file edits",
            },
            desc: {
                commit: "Requires the commit interval not to be 0.  If turned on, do auto commit every {minutes} minutes after stopping file edits.\
                        This also prevents auto commit while editing a file. If turned off, it's independent from the last file edit.",
                "commit-and-sync":
                    "Requires the commit-and-sync interval not to be 0.  If turned on, do auto commit-and-sync every {minutes} minutes after stopping file edits.\
                        This also prevents auto commit and sync while editing a file. If turned off, it's independent from the last file edit.",
            },
        },
        autoCommitAfterLastCommit: {
            name: {
                commit: "Auto commit after latest commit",
                "commit-and-sync": "Auto commit-and-sync after latest commit",
            },
            desc: {
                commit: "If turned on, sets last auto commit timestamp to the latest commit timestamp. \
                    This reduces the frequency of auto commit when doing manual commits.",
                "commit-and-sync":
                    "If turned on, sets last auto commit-and-sync timestamp to the latest commit timestamp. \
                    This reduces the frequency of auto commit-and-sync when doing manual commits.",
            },
        },
        autoPushInterval: {
            name: "Auto push interval (minutes)",
            desc: "Push commits every {minutes} minutes. Set to 0 (default) to disable.",
        },
        autoPullInterval: {
            name: "Auto pull interval (minutes)",
            desc: "Pull changes every {minutes} minutes. Set to 0 (default) to disable.",
        },
        autoCommitOnlyStageFiles: {
            name: {
                commit: "Auto commit only stage files",
                "commit-and-sync": "Auto commit and sync only stage files",
            },
            desc: {
                commit: "Auto commit only stage files.",
                "commit-and-sync":
                    "If turned on, only staged files are committed on commit and sync. If turned off, all changed files are committed.",
            },
        },
        customCommitMessage: {
            name: {
                commit: "Specify custom commit message on auto commit",
                "commit-and-sync":
                    "Specify custom commit message on auto commit and sync",
            },
            desc: "You will get a pop up to specify your message.",
        },
        commitMessage: {
            name: {
                commit: "Commit message on auto commit.",
                "commit-and-sync": "Commit message on auto commit and sync.",
            },
            desc:
                "Available placeholders: {{date}}" +
                " (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).",
        },
        commitMessageManual: {
            name: "Commit message on manual commit",
            desc:
                " Available placeholders: {{date}}" +
                "(see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).",
        },
        commitMessageScript: {
            name: "Commit message script",
            desc: "A script that is run using 'sh -c' to generate the commit message. \
                    May be used to generate commit messages using AI tools. Available placeholders: {{hostname}}, {{date}}.",
        },
        commitDateFormat: {
            name: "{{date}} placeholder format",
            desc: `Specify custom date format. E.g. YYYY-MM-DD HH:mm:ss. See <a href="https://momentjs.com">Moment.js</a> for more formats.`,
        },
        commitHostname: {
            name: "{{hostname}} placeholder replacement",
            desc: "Specify custom hostname for every device.",
        },
        commitPreviewMsg: {
            name: "Preview commit message",
        },
        listCommitAffectFile: {
            name: "List filenames affected by commit in the commit body",
        },
        mergeStrategy: {
            name: "Merge strategy",
            desc: "Decide how to integrate commits from your remote branch into your local branch.",
            merge: "Merge",
            rebase: "Rebase",
            reset: "Other sync service (Only updates the HEAD without touching the working directory)",
        },
        pullOnStartup: {
            name: "Pull on startup",
            desc: "Automatically pull commits when Obsidian starts.",
        },
        pullCommitSync: {
            name: "Commit-and-sync",
            desc: "Commit-and-sync with default settings means staging everything -> committing -> pulling -> pushing. Ideally this is a single action that you do regularly to keep your local and remote repository in sync.",
        },
        pushOnCommitSync: {
            value: "and pull ",
            name: "Push on commit-and-sync",
            desc: `Most of the time you want to push after committing. Turning this off turns a commit-and-sync action into commit {pullBeforePush}only. It will still be called commit-and-sync.`,
        },
        pullOnCommitSync: {
            value: "and push ",
            name: "Pull on commit-and-sync",
            desc: `On commit-and-sync, pull commits as well. Turning this off turns a commit-and-sync action into commit {disablePush} only.`,
        },
        hvShowAuthor: {
            name: "Show Author",
            desc: "Show the author of the commit in the history view.",
            hide: "Hide",
            full: "Full",
            initials: "Initials",
        },
        showDate: {
            name: "Show Date",
            desc: "Show the date of the commit in the history view. The {{date}} placeholder format is used to display the date.",
        },
        srvAutoRefresh: {
            name: "Automatically refresh source control view on file changes",
            desc: "On slower machines this may cause lags. If so, just disable this option.",
        },
        srvAutoReInt: {
            name: "Source control view refresh interval",
            desc: "Milliseconds to wait after file change before refreshing the Source Control View.",
        },
        miscDiffView: {
            name: "Diff view style",
            desc: 'Set the style for the diff view. Note that the actual diff in "Split" mode is not generated by Git, but the editor itself instead so it may differ from the diff generated by Git. One advantage of this is that you can edit the text in that view.',
        },
        miscDisableNoti: {
            name: "Disable informative notifications",
            desc: "Disable informative notifications for git operations to minimize distraction (refer to status bar for updates).",
        },
        miscDisableErroNoti: {
            name: "Disable error notifications",
            desc: "Disable error notifications of any kind to minimize distraction (refer to status bar for updates).",
        },
        miscHideNoti: {
            name: "Hide notifications for no changes",
            desc: "Don't show notifications when there are no changes to commit or push.",
        },
        miscShowStatusBar: {
            name: "Show status bar",
            desc: "Obsidian must be restarted for the changes to take affect.",
        },
        miscFileMenuInte: {
            name: "File menu integration",
            desc: `Add "Stage", "Unstage" and "Add to .gitignore" actions to the file menu.`,
        },
        miscShowBranchBar: {
            name: "Show branch status bar",
            desc: "Obsidian must be restarted for the changes to take affect.",
        },
        miscShowFileCount: {
            name: "Show the count of modified files in the status bar",
        },
        authUsername: {
            name: "Username on your git server. E.g. your username on GitHub",
        },
        authPassToken: {
            name: "Password/Personal access token",
            desc: "Type in your password. You won't be able to see it again.",
        },
        authorName: {
            name: "Author name for commit",
            email: "Author email for commit",
        },
        adDesc: "These settings usually don't need to be changed, but may be required for special setups.",
        adUpdateSub: {
            name: "Update submodules",
            desc: '"Commit-and-sync" and "pull" takes care of submodules. Missing features: Conflicted files, count of pulled/pushed/committed files. Tracking branch needs to be set for each submodule.',
        },
        adSubRecurse: {
            name: "Submodule recurse checkout/switch",
            desc: "Whenever a checkout happens on the root repository, recurse the checkout on the submodules (if the branches exist).",
        },
        adCustomGit: "Custom Git binary path",
        adAdditionalEnv: {
            name: "Additional environment variables",
            desc: "Use each line for a new environment variable in the format KEY=VALUE .",
        },
        adAdditionalPath: {
            name: "Additional PATH environment variable paths",
            desc: "Use each line for one path",
        },
        adReloadEnv: {
            name: "Reload with new environment variables",
            desc: "Removing previously added environment variables will not take effect until Obsidian is restarted.",
        },
        adCustomBasePath: {
            name: "Custom base path (Git repository path)",
            desc: `
            Sets the relative path to the vault from which the Git binary should be executed.
             Mostly used to set the path to the Git repository, which is only required if the Git repository is below the vault root directory. Use "\\" instead of "/" on Windows.
            `,
        },
        adCustomGitDir: {
            name: "Custom Git directory path (Instead of '.git')",
            desc: `Requires restart of Obsidian to take effect. Use "\\" instead of "/" on Windows.`,
        },
        adDisableDev: {
            name: "Disable on this device",
            desc: "Disables the plugin on this device. This setting is not synced.",
            restart:
                "Obsidian must be restarted for the changes to take affect.",
        },
        donate: {
            name: "Donte",
            desc: "If you like this Plugin, consider donating to support continued development.",
        },
        debugInfo:
            "Debug information copied to clipboard. May contain sensitive information!",
    },
    headers: {
        autoMatic: "AutoMatic",
        commitMessage: "Commit message",
        pull: "Pull",
        commitSync: "Commit-and-Sync",
        lineAuthor: "Line author information",
        historyView: "History view",
        sourceCtrlView: "Source control view",
        miscellaneous: "Miscellaneous",
        commitAuthor: "Commit author",
        commitAuthAuthor: "Authentication/commit author",
        advanced: "Advanced",
        support: "Support",
    },
};

export default locale;
